// pages/order/xq/xq.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
	http:getApp().globalData.map
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
// action= returnAppShow，og_id=子订单ID
wx.getStorage({
	key:'uid',
	success: (res) => {
		wx.request({
			url:getApp().globalData.http+'action=returnDetail&thid='+options.id+'&uid='+res.data.uid,
			success: (e) => {
				console.log(e)
				this.setData({
					data:e.data.data
				})
			}
		})
	}
})
  },
  nonec(){
  	  wx.showModal({
  		  title:'确定要撤销申请吗？',
  		  success: (res) => {
  			  console.log(res)
  		  	if (res.confirm) {
  		  		wx.request({
  						// action=deleteReturnOrder, thid=退换货ID, uid=用户ID
  					url:getApp().globalData.http+'action=deleteReturnOrder&uid='+this.data.uid+'&thid='+this.data.thid,
  					success: (e) => {
  						console.log(e)
  						wx.showToast({
  							title:e.data.msg,
  							icon:'none',
  							success: () => {
  								wx.navigateBack({delta:1})
  							}
  						})
  					}
  				})
  		  	}
  		  }
  	  })
  }
})